package _switch

import (
	"db2s/ckR"
	"db2s/syM"
	"db2s/syR"
	"db2s/tkM"
	"reflect"
)

func GetModeName(s string) (m string) {
	switch s {
	case "count", "rows", "samp":
		m = "checkData"
	case "sync":
		m = "syncData"
	case "load":
		m = "loadData"
	case "hotSql":
		m = "hotSql"
	case "task":
		m = "task"
	case "taskOld":
		m = "taskOld"
	case "struct", "object":
		m = "Meta"
	case "slowLog":
		m = "slowLog"
	}
	return
}

var ModeFunc = map[string]reflect.Value{
	"checkData": reflect.ValueOf(ckR.Audit),
	"syncData":  reflect.ValueOf(syR.Audit),
	//"hotSql":        reflect.ValueOf(hotSqlPlay.Audit),
	"Meta": reflect.ValueOf(syM.Audit),
	"task": reflect.ValueOf(tkM.Audit),
	//"slowLog":       reflect.ValueOf(slowLog.Audit),
	//"loadData": reflect.ValueOf(loadData.Audit),
}
